﻿using System;
using BrightSword.OfficeInterop.Internal;
using Microsoft.Office.Interop.Excel;

namespace BrightSword.OfficeInterop
{
    public class ExcelReadProcessor : ExcelApplicationWrapper
    {
        public ExcelReadProcessor(string filename) : base(filename) {}

        public void Process(IExcelReadProcessorArg readProcessor, params object [ ] args)
        {
            Workbook.ProcessWorkbook(readProcessor, args);
        }

        public void ProcessRows(Action<Range, object [ ]> rowProcessor, string worksheetName = null, params object [ ] args)
        {
            Workbook.ProcessWorkbook(rowProcessor, worksheetName, args);
        }
    }
}